﻿using System.Linq;
using AzureDiagMon.Common;

namespace AzureDiagMon.Model.Helpers
{
    public static class SampleDataHelper
    {
        public static void Init()
        {
            var dtx = IoC.Get<IModelsContainer>();
            {
                if (dtx.StorageAccountSet.Count() == 0)
                {
                    dtx.StorageAccountSet.AddObject(new StorageAccount()
                                                        {
                                                            //Id = Guid.NewGuid(),
                                                            AccountName = "rmtests",
                                                            AccessKey =
                                                                "TTTyLcCwiioQJrtP32YhvzDfo38U4276hjVTGU1Ll2PAiTG4FE4TRrQZmNeYmXaHNcZsVwPlvL0JezSCQEUr+Q=="
                                                        });
                }
                dtx.SaveChanges();
            }
        }
    }
}
